package controller;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.Sessions;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.Listen;
import org.zkoss.zk.ui.select.annotation.Wire;

public class LogoutCtrl extends SelectorComposer<Component>{
	
	private static final long serialVersionUID = 1L;

	@Listen("onClick = #linkLogout")
	public void logout(){
		Sessions.getCurrent().removeAttribute("user");
		Executions.sendRedirect("login.jsp");
		
	}
}
